Skip to content

feat(@angular/cli): add platform: server - #5547

Closed
FrozenPandaz wants to merge 1 commit into
angular:masterfrom
FrozenPandaz:universal/platform
Closed

feat(@angular/cli): add platform: server#5547
FrozenPandaz wants to merge 1 commit into
angular:masterfrom
FrozenPandaz:universal/platform

Conversation

@FrozenPandaz

Copy link
Copy Markdown
Contributor

This adds the platform field to the cli config.

"browser" is by default and "server" is also allowed.

passing server will generate a bundle meant for the server via ng build

@filipesilva filipesilva left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test that confirms this functionality?

@cyrilletuzi

Copy link
Copy Markdown
Contributor

From what I understand from the commits, polyfills have been moved from common config to browser only config.

But server rendering needs the polyfills too. And for zone.js, it even needs a different import :
import 'zone.js/dist/zone-node';

@hansl hansl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 nit which will help with documentation, and it's all good.

"description": "The output directory for build results."
},
"platform": {
"type": "string",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be an enum instead of string?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no "enum" type. More like:
"platform": {
"type": "string",
"enum": ["browser", "server"],
"description": "The destination platform of app."
}

@hansl

hansl commented Jun 19, 2017

Copy link
Copy Markdown
Contributor

We should disable ng serve for server apps with this PR and re-enable it when we support it.

@glebmachine

Copy link
Copy Markdown

Looking forward this feature)

@markwhitfeld

Copy link
Copy Markdown

@FrozenPandaz Thanks so much for taking this on! Any idea on when you will get a chance to have a look at this again? I'm eagerly awaiting this feature ;)

@intellix

Copy link
Copy Markdown
Contributor

This is superseded by #6913 ?

@filipesilva

Copy link
Copy Markdown
Contributor

Closed by #6913.

@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants